package com.hk.service.kyc;

import java.util.List;

import com.hk.commons.DateUtil;
import com.hk.commons.HqlFilter;
import com.hk.commons.entity.Points;
import com.hk.commons.vo.app.CheckResultMsg;

public interface IPoints {
	
	public Points findById(Integer id);

	/**
	 * 保存
	 * 
	 * @param b
	 * @return
	 */
	public void add(Points u);

	/**
	 * 删除
	 * 
	 * @param id
	 * @return
	 */
	public void delete(Points u);

	/**
	 * 更新
	 * 
	 * @param b
	 */
	public void update(Points u);

	public List<Points> findByFilter(HqlFilter hqlFilter, int pageNum,
			int pageSize);

	public List<Points> findByFilter(HqlFilter hqlFilter);

	public Long countByFilter(HqlFilter hqlFilter);
	
	/**
	 * 根据积分类型获取积分
	 * @param pointType
	 * @return
	 */
	public Points getPoinitsByType(Integer pointType);
	
	/**
	 * 获取分值
	 * @param pointId
	 * @return
	 */
	public Integer  getVal(Integer pointId);
	
	/**
	 * 查看分值是否够用, 活动是否已经启动
	 * @param pointType
	 * @param userId
	 * @return
	 */
	public CheckResultMsg checkPoints(Integer pointType, Long userId);
	
	public String getAddUserMsg(Long UserId); 
	
	public String getAddTieCardMsg(Long UserId);
	
	public String getAddBespeakOrderMsg(Long UserId);
	
	public String getAddPayOrderMsg(Long UserId);
	
	public CheckResultMsg checkActive(Integer pointType, Long userId);
	/**
	 * 根据id 判断积分规则是否存在
	 * @param pointId
	 * @return
	 */
	public Boolean checkExistById(Integer pointId);
}
